package uk.co.q3c.deplan.server.util;

import uk.co.q3c.deplan.client.domain.resource.Resource;
import uk.co.q3c.deplan.client.domain.task.BaseTask;
import uk.co.q3c.deplan.client.domain.task.Task;
import uk.co.q3c.deplan.client.domain.task.Task;

/**
 * Implemented by:<br> {@link XMLImport_dePlan}
 * 
 * @author DSowerby 19 Oct 2008
 * 
 */
public interface XMLImporter {

	Resource resolveResource(String reference);

	/**
	 * Called by a task which holds a reference to a predecessor. The reference is held in {@link predecessorRefs} and fully deReferenced
	 * later by {@link #deReference}
	 */
	void resolvePredecessor(Task task, String reference);

	/**
	 * see {@link #resolvePredecessor(BaseTask, String)}
	 * 
	 * @param task
	 * @param reference
	 */
	void resolveSuccessor(Task task, String reference);

	/**
	 * Walks through the reference lists {@link successorRefs} and {@link predecessorRefs} and deRefrences each in turn, updating the
	 * calling task.
	 */

	void deReference(Task masterProject);

	/**
	 * Save the supplied object to persistence
	 * 
	 * @param object
	 */
	void save(Object object);

}
